<template>
  <div class="evaluate-score">
    <span
      v-for="i in evaluateScore"
      :key="i"
      class="iconfont"
      :class="evaluateScore < i ? ['icon-xin'] : ['icon-xin2', 'active']"
    ></span>
    <span class="text">{{textMap[evaluateScore]}}</span>
  </div>
</template>

<script>
import { reactive } from 'vue'
export default {
  name: 'EvaluateDetailScore',
  props: {
    evaluateScore: {
      type: Number,
      default: null
    }
  },
  setup () {
    const textMap = reactive({
      1: '非常差',
      2: '差',
      3: '一般',
      4: '好',
      5: '非常好'
    })
    return { textMap }
  }
}
</script>

<style lang="less" scoped>
.evaluate-score {
  .iconfont {
    margin-right: 10px;
    vertical-align: middle;
    &.active {
      color: #ff9240;
    }
  }
  .text {
    vertical-align: middle;
    color: #ff9240;
  }
}
</style>
